#include<iostream>
using namespace std;
int main()
{
    double arr[9]={1,2,3,4,5,6,7,8,9};
    double max=arr[0],min=arr[0],all=0;
    for(int i=0;i<9;i++)
    {
    	if(max<arr[i]) max=arr[i];
    	if(min>arr[i]) min=arr[i];
    	all+=arr[i];
    }
    cout<<(all-(max+min))/7;
	return 0;
}
